#include<iostream>
#include<cstring>
#include"person.h"

using namespace std;

Person::Person(int r):m_r(r), m_age(0), m_height(0)
{
	memset(m_name, '\0',NAMESIZE);
}

Person::Person(int r, int age, float height, const char *name):m_r(r)
{
	m_age = age;
	m_height = height;
	strncpy(m_name, name, NAMESIZE);
}

void Person::show()
{
	cout << m_name << "今年" << m_age << "岁，身高" << m_height << endl;
}

void Person::setName(const char *name)
{
	strncpy(m_name, name, NAMESIZE);
}

void Person::setAge(int age)
{
	
}
Person::~Person()
{
	cout << "析构方法" << endl;
}
